<template>
  <view class="device-list-container">
    <div class="title">
      <div>手机号</div>
      <div>注册时间</div>
      <div>{{ type === 'valid' ? '有效期' : '失效时间' }}</div>
    </div>
    <div class="list" v-for="item in data" :key="item.id">
      <div>{{ item.phone }}</div>
      <div>{{ item.createdAt }}</div>
      <div>{{ item.effectiveTime }}</div>
    </div>
  </view>
</template>

<script>
export default {
  name: 'DeviceList',
  props: {
    type: {
      type: String
    },
    data:{
      default:[]
    }
  },
  data() {
    return {}
  }
}
</script>

<style lang="scss">
.device-list-container {
  padding-top: 20px;
  border-top: 1px solid #f7f7f7;
  .title {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 6px;
  }
  .list {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    > div {
      margin-bottom: 16px;
    }
  }
}
</style>
